Skip to content

Orange Pi Zero 2 (Allwinner H616): BSP bring-up + uwe5622 SDIO WiFi driver - #84

Open
berte wants to merge 1 commit into
NetBSD:trunkfrom
berte:berte/orange_pi_zero2
Open

Orange Pi Zero 2 (Allwinner H616): BSP bring-up + uwe5622 SDIO WiFi driver#84
berte wants to merge 1 commit into
NetBSD:trunkfrom
berte:berte/orange_pi_zero2

Conversation

@berte

@berte berte commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds NetBSD support for the Orange Pi Zero 2 (Allwinner H616), including:

  • H616 SoC bring-up: new CCU (clock controller) and GPIO drivers (sun50i_h616_ccu.c/h, sun50i_h616_gpio.c), plus real IRQ/DMA support added to sunxi_mmc.c for the SD/MMC controllers.
  • uwe5622_sdio(4): a new driver for the UNISOC (Spreadtrum) uwe5622 SDIO Wi-Fi chip found on this board. Firmware does the full 802.11 MAC internally; the driver implements the SDIO transport, the vendor SPRDWL command/event protocol, and the net80211/wpa_supplicant(8) bridge. Supports open networks and WPA2-Personal (PSK/CCMP) on both 2.4GHz and 5GHz. WPA3/SAE is not supported - the firmware's own command ABI has no AKM/auth-type value for it.
  • A small addition to the generic LED framework (led_set_by_name()) used to drive a TX/RX activity LED from the driver.
  • A man page, uwe5622_sdio(4).

The driver is split into several files under sys/dev/sdmmc/ (if_uwe5622_sdio.c plus _transport.c/_fw.c/_proto.c/_data.c/_net80211.c and a shared if_uwe5622_sdiovar.h), following the same pattern as sdmmc.c/sdmmc_io.c/sdmmc_mem.c in the same directory. Firmware/calibration blobs live under sys/dev/microcode/uwe5622/, matching the existing convention used by bge/tigon/atmel.

Test plan

All tested on real Orange Pi Zero 2 hardware, netbooted:

  • Open (unencrypted) network association, DHCP, sustained TCP/UDP throughput (iperf3), ping
  • WPA2-PSK/CCMP association via wpa_supplicant, full 4-way handshake, pairwise + group key install
  • 2.4GHz and 5GHz operation against both dedicated test APs and a real production mesh router, including a live roam between mesh nodes
  • Sustained throughput ~35-80 Mbit/s depending on band, near-zero idle CPU via real SDIO hardware interrupts (vs. polling)
  • TX/RX activity LED confirmed working during sustained traffic
  • Full regression pass after splitting the driver into multiple files identical behavior to the pre-split single-file version

Known limitations

  • WPA3-Personal (SAE) is not supported (firmware command ABI limitation)
  • The Bluetooth function of the same physical chip is not yet implemented

This work is dedicated to my son, who's about to turn one, and to my lovely wife ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant